<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>check</title>
</head>
<body>
<div>
说明：若 qq 号码为12<span style="color:#FF0000;">3456789</span>,请输入红色部分,前两位自动填充为10 ~ 99
</div>
<div style="width:100%;text-align:center;">
    QQ:<input type="text" id="qq" value="" size="15" maxlength="10" onkeyup="if(event.keyCode == 13){refreshQQ();}"/>
       <input type="button" value="刷新" onclick="refreshQQ()"/>
       <span id="info"></span>
</div>
<div id="qq_table">    
</div>
<script type="text/javascript">
// init
document.getElementById("qq").focus();
/**
 * refresh qq
 */
function refreshQQ(){
    var qq = document.getElementById("qq").value;
    var table = document.getElementById("qq_table");
    var content = "<table width='92%' align='center' style='border:1px solid #DFE8F6;border-collapse:collapse;'>";    
    content += "<tbody>";
    content += "<tr>";
    content += "<td style='border:1px solid #DFE8F6;'>&nbsp;</td>";
    for (var i=0; i<10; i++){
        content += "<td style='border:1px solid #DFE8F6;'>" + i + "</td>";
    }
    content += "</tr>";
    var tmp = "";
    for (var i=1; i<=9; i++){
        content += "<tr>";
        content += "<td style='border:1px solid #DFE8F6;'>" + i + "</td>";
        for (var j=0; j<=9; j++){
            tmp = "" + i + j + qq;
            content += "<td style='border:1px solid #DFE8F6;'>" + "<img src='http://wpa.qq.com/pa?p=1:" + tmp + ":41' title='" + tmp + "' onclick='setCopy(" + tmp + ")'/>" + "</td>";
        }
        content += "</tr>";
    }
    content += "</tbody>";
    content += "</table>";
    //   
    table.innerHTML = content;  
}
/**
 * 设置剪切板的内容
 */
function setCopy(data){
	try {
        clipboardData.setData("Text","" + data);
        document.getElementById("info").innerHTML = "复制 [" + data + "] 成功";
        document.getElementById("info").style.color = "#0000EE";
	} catch(e){
		document.getElementById("info").innerHTML = "复制 [" + data + "] 失败";
		document.getElementById("info").style.color = "#FF0000";
	}
}
</script>
</body>
</html>